<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//正则里面的特殊符号
	var str = 'abc^kde';
	var re = /\^k/;
	console.log(re.test(str)); //true
	
	var str1 = '123456a';
	var re1 = /\D/;
	console.log(re1.test(str1));
	
	var str2 = 'bcd';
	var re2 = /a+/;
	console.log(re2.test(str2));

	var str3 = 'bcd';
	var re3 = /a*/;
	console.log(re3.test(str3));

	var str4 = 'aaacda';
	var re4 = /a?/g;
	console.log(re4.test(str4));

	var str5 = 'cdaa';
	var re5 = /a{2}/g;
	console.log(re5.test(str5));

	var str6 = 'aaaaaaaa';
	var re6 = /a{2,5}/g;
	console.log(re6.test(str6));

	var str7 = 'aaaaaaaab';
	var re7 = /a$/g;
	console.log(re7.test(str7));

	var str8 = 'caaaaaaab';
	var re8 = /^ca/g;
	console.log(re8.test(str8));
	
	var str9 = 'eee';
	var re9 = /[abc]/g;  //^非
	console.log(re9.test(str9));
	
	var stra = 'A';
	var rea = /[A-z0-9]/g;
	console.log(rea.test(stra));

</script>
